A Quasi-Polynomial-Time Algorithm for Sampling Words from a Context-Free Language

نویسندگان

  • Vivek Gore
  • Mark Jerrum
  • Sampath Kannan
  • Elizabeth Sweedyk
  • Stephen R. Mahaney
چکیده

A quasi-polynomial-time algorithm is presented for sampling almost uniformly at random from the n-slice of the language L(G) generated by an arbitrary context-free grammar G. (The n-slice of a language L over an alphabet is the subset L\ n of words of length exactly n.) The time complexity of the algorithm is " ?2 (n jGj) O(log n) , where the parameter " bounds the variation of the output distribution from uniform , and jGj is a natural measure of the size of grammar G. The algorithm applies to a class of language sampling problems that includes slices of context-free languages as a proper subclass.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Quasi-polynomial-time Algorithm for Sampling Words from a Context-free Language 1 Problem Speciication and History

A quasi-polynomial-time algorithm is presented for sampling almost uniformly at random from the n-slice of the language L(G) generated by an arbitrary context-free grammar G. (The n-slice of a language L over an alphabet is the subset L\ n of words of length exactly n.) The time complexity of the algorithm is " ?2 (n jGj) O(log n) , where the parameter " bounds the variation of the output distr...

متن کامل

Towards Automating Grammar Equivalence Checking

We consider from practical perspective the (generally undecidable) problem of checking equivalence of context-free grammars. We present both techniques for proving equivalence, as well as techniques for finding counter-examples that establish non-equivalence. Among the key building blocks of our approach is a novel algorithm for efficiently enumerating and sampling words and parse trees from ar...

متن کامل

The Inclusion Problem of Context-Free Languages: Some Tractable Cases

We study the problem of testing whether a context-free language is included in a fixed set L0, where L0 is the language of words reducing to the empty word in the monoid defined by a complete string rewrite system. We prove that, if the monoid is cancellative, then our inclusion problem is polynomially reducible to the problem of testing equivalence of straight-line programs in the same monoid....

متن کامل

Property and Equivalence Testing on Strings

We investigate property testing and related questions, where instead of the usual Hamming and edit distances between input strings, we consider the more relaxed edit distance with moves. Using a statistical embedding of words which has similarities with the Parikh mapping, we first construct a tolerant tester for the equality of two words, whose complexity is independent of the string size, and...

متن کامل

Non-redundant random generation from weighted context-free languages

We address the non-redundant random generation of k words of length n from a contextfree language. Additionally, we want to avoid a predefined set of words. We study the limits of a rejection-based approach, whose time complexity is shown to grow exponentially in k in some cases. We propose an alternative recursive algorithm, whose careful implementation allows for a non-redundant generation of...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Inf. Comput.

دوره 134  شماره 

صفحات  -

تاریخ انتشار 1997